package com.tp3.nutribar;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class AjouterRepasPart3 extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ajouter_repas_part3);
        
        final Button button_stats = (Button) findViewById(R.id.statistiques_bouton);
        button_stats.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
            	Intent myIntent = new Intent(AjouterRepasPart3.this, Statistiques.class);
            	AjouterRepasPart3.this.startActivity(myIntent);
            }
        });
        
        final Button button_profil = (Button) findViewById(R.id.profil_sante_bouton);
        button_profil.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
            	Intent myIntent = new Intent(AjouterRepasPart3.this, ActProfilSante.class);
            	AjouterRepasPart3.this.startActivity(myIntent);
            }
        });
    
        final Button button_dashboard = (Button) findViewById(R.id.resume_journee_bouton);
        button_dashboard.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
            	Intent myIntent = new Intent(AjouterRepasPart3.this, Dashboard.class);
            	AjouterRepasPart3.this.startActivity(myIntent);
            }
        });
        
        
        final Button button_confirmer_ajout_repas = (Button) findViewById(R.id.confirmer_ajout_bouton);
        button_confirmer_ajout_repas.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
            	DashboardStatus.setInstance("@drawable/dashboard_after_one_slice_transparent");
            	Intent myIntent = new Intent(AjouterRepasPart3.this, Dashboard.class);
            	AjouterRepasPart3.this.startActivity(myIntent);
            }
        });
        
        final Button button_annuler_ajout_repas = (Button) findViewById(R.id.annuler_ajout_bouton);
        button_annuler_ajout_repas.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
            	Intent myIntent = new Intent(AjouterRepasPart3.this, AjouterRepasPart2.class);
            	AjouterRepasPart3.this.startActivity(myIntent);
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_ajouter_repas2, menu);
        return true;
    }
}
